package iotwisp.school.user.qo;

import iotwisp.base.cqrs.BaseQO;
import iotwisp.base.orm.query.QueryCondition;
import iotwisp.base.orm.query.QueryConditionType;
import iotwisp.base.orm.query.QueryConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;

@SuppressWarnings("serial")
@Data
@EqualsAndHashCode(callSuper = false)
@QueryConfig(daoBeanId = "organizationService")
public class OrganizationQO extends BaseQO<String> {

    @QueryCondition(name = "parentOrg.id")
    private String parentOrgId;

    @QueryCondition(name = "parentOrg", type = QueryConditionType.FETCH_EAGER)
    private Boolean fetchParentOrg;

    @QueryCondition(name = "manageLimit", type = QueryConditionType.LEFT_JOIN)
    private ManageLimitQO manageLimitQO;

    @QueryCondition(name = "manageLimit", type = QueryConditionType.FETCH_EAGER)
    private Boolean fetchManageLimit;

    @QueryCondition(name = "name", ifTrueUseLike = "nameLike")
    private String name;

    private Boolean nameLike;

    @QueryCondition(name = "remove")
    private Boolean remove = false;

    private Boolean fetchManholeCoverCount = false;
}
